package org.lq.shopping.entity;

import java.io.Serializable;
import java.sql.Date;
/**
 * 用户实体类
 * @author: 清欢渡
 * @date: 2018年9月26日
 *
 */
public class ShopUser implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -757256047367584026L;
	
	private int user_id;//用户id
	private String uname;//用户名
	private String nickname;//昵称
	private String name;//真实姓名
	private String upass;//密码
	private String phone;//性别
	private String gender;//性别
	private int age;//年龄
	private String email;//邮箱
	private String img;//用户头像
	private double income;//家庭收入
	private int member;//家庭成员
	private String education;//学历
	private String occupation;//职业
	private int integral;//积分
	private Date regtime;//注册时间
	private int vip_id;//会员等级id
	private int user_state ;//用户状态
	
	public ShopUser() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	public ShopUser(int user_id, String uname, String nickname, String name, String upass, String phone, String gender,
			int age, String email, String img, double income, int member, String education, String occupation,
			int integral, Date regtime, int vip_id) {
		super();
		this.user_id = user_id;
		this.uname = uname;
		this.nickname = nickname;
		this.name = name;
		this.upass = upass;
		this.phone = phone;
		this.gender = gender;
		this.age = age;
		this.email = email;
		this.img = img;
		this.income = income;
		this.member = member;
		this.education = education;
		this.occupation = occupation;
		this.integral = integral;
		this.regtime = regtime;
		this.vip_id = vip_id;
	}

	public int getUser_id() {
		return user_id;
	}
	public void setUser_id(int user_id) {
		this.user_id = user_id;
	}
	public String getUname() {
		return uname;
	}
	public void setUname(String uname) {
		this.uname = uname;
	}
	public String getNickname() {
		return nickname;
	}
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getUpass() {
		return upass;
	}
	public void setUpass(String upass) {
		this.upass = upass;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public String getGender() {
		return gender;
	}
	public void setGender(String gender) {
		this.gender = gender;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getImg() {
		return img;
	}
	public void setImg(String img) {
		this.img = img;
	}
	public double getIncome() {
		return income;
	}
	public void setIncome(double income) {
		this.income = income;
	}
	public int getMember() {
		return member;
	}
	public void setMember(int member) {
		this.member = member;
	}
	public String getEducation() {
		return education;
	}
	public void setEducation(String education) {
		this.education = education;
	}
	public String getOccupation() {
		return occupation;
	}
	public void setOccupation(String occupation) {
		this.occupation = occupation;
	}
	public int getIntegral() {
		return integral;
	}
	public void setIntegral(int integral) {
		this.integral = integral;
	}
	public Date getRegtime() {
		return regtime;
	}
	public void setRegtime(Date regtime) {
		this.regtime = regtime;
	}
	public int getVip_id() {
		return vip_id;
	}
	public void setVip_id(int vip_id) {
		this.vip_id = vip_id;
	}
	
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + age;
		result = prime * result + ((education == null) ? 0 : education.hashCode());
		result = prime * result + ((email == null) ? 0 : email.hashCode());
		result = prime * result + ((gender == null) ? 0 : gender.hashCode());
		result = prime * result + ((img == null) ? 0 : img.hashCode());
		long temp;
		temp = Double.doubleToLongBits(income);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		result = prime * result + integral;
		result = prime * result + member;
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result + ((nickname == null) ? 0 : nickname.hashCode());
		result = prime * result + ((occupation == null) ? 0 : occupation.hashCode());
		result = prime * result + ((phone == null) ? 0 : phone.hashCode());
		result = prime * result + ((regtime == null) ? 0 : regtime.hashCode());
		result = prime * result + ((uname == null) ? 0 : uname.hashCode());
		result = prime * result + ((upass == null) ? 0 : upass.hashCode());
		result = prime * result + user_id;
		result = prime * result + vip_id;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ShopUser other = (ShopUser) obj;
		if (age != other.age)
			return false;
		if (education == null) {
			if (other.education != null)
				return false;
		} else if (!education.equals(other.education))
			return false;
		if (email == null) {
			if (other.email != null)
				return false;
		} else if (!email.equals(other.email))
			return false;
		if (gender == null) {
			if (other.gender != null)
				return false;
		} else if (!gender.equals(other.gender))
			return false;
		if (img == null) {
			if (other.img != null)
				return false;
		} else if (!img.equals(other.img))
			return false;
		if (Double.doubleToLongBits(income) != Double.doubleToLongBits(other.income))
			return false;
		if (integral != other.integral)
			return false;
		if (member != other.member)
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (nickname == null) {
			if (other.nickname != null)
				return false;
		} else if (!nickname.equals(other.nickname))
			return false;
		if (occupation == null) {
			if (other.occupation != null)
				return false;
		} else if (!occupation.equals(other.occupation))
			return false;
		if (phone == null) {
			if (other.phone != null)
				return false;
		} else if (!phone.equals(other.phone))
			return false;
		if (regtime == null) {
			if (other.regtime != null)
				return false;
		} else if (!regtime.equals(other.regtime))
			return false;
		if (uname == null) {
			if (other.uname != null)
				return false;
		} else if (!uname.equals(other.uname))
			return false;
		if (upass == null) {
			if (other.upass != null)
				return false;
		} else if (!upass.equals(other.upass))
			return false;
		if (user_id != other.user_id)
			return false;
		if (vip_id != other.vip_id)
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "ShopUser [user_id=" + user_id + ", uname=" + uname + ", nickname=" + nickname + ", name=" + name
				+ ", upass=" + upass + ", phone=" + phone + ", gender=" + gender + ", age=" + age + ", email=" + email
				+ ", img=" + img + ", income=" + income + ", member=" + member + ", education=" + education
				+ ", occupation=" + occupation + ", integral=" + integral + ", regtime=" + regtime + ", vip_id="
				+ vip_id + "]";
	}

	public int getUser_state() {
		return user_state;
	}

	public void setUser_state(int user_state) {
		this.user_state = user_state;
	}
	
	
	

}
